<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>任务 - 会员中心 -  {:C('YTATA_SITE_NAME')}</title>
<link href="__ROOT__/{:C('YTATA_TPL_DIR')}/public/css/user.css" rel="stylesheet" type="text/css">
<include file="public:header" />
<div class="usermain">
  <div class="mleft">
<include file="left_nav" />
  </div>
  
  <div class="mright">
  
    
	
    <div class="mbox">
	  	<div class="utopt">
			  <div class="tit">我的任务</div>
			<a class="snav <if condition="$type eq ''">select</if>" href="{:RU('user/task',array('type'=>''))}">全部</a>
<a class="snav <if condition="$type eq '1'">select</if>" href="{:RU('user/task',array('type'=>1))}">单次任务</a>
<a class="snav <if condition="$type eq '2'">select</if>" href="{:RU('user/task',array('type'=>2))}">重复任务</a>
 

			<div class="clear"></div>
	  </div>
	  
	   <div class="user_list_th">
		  <div class="td" style=" width:40%;"> 
		  <div class="left_txt_td">任务名称</div>
		</div>
		<div class="td" style=" width:30%;">奖励{:C('YTATA_GOLD_BYNAME')}</div>
		<div class="td" style=" width:20%;">奖励经验</div>
		<div class="td" style=" width:10%;">完成状态</div>
	 
		  <div class="clear"></div>
		</div>
		
	  <volist name="list" id="list">
					   <div class="user_list_tr h60 link_bk">
						<div class="td" style=" width:40%;">
						  <div class="left_txt_td striking">
							  
							<img src="__ROOT__/{:C('YTATA_IMG_TASK_DIR')}{$list.id}.png"  border="0" align="absmiddle" style="width:35px; height:35px;  margin-right:15px; "/>{$list.name}							  </div>
						</div>
						<div class="td" style=" width:30%;">
						<gt name="list.gold" value="0">+</gt>{$list.gold}
						</div>
						<div class="td" style=" width:20%;">
						<gt name="list.exp" value="0">+</gt>{$list.exp}
						</div>
						<div class="td" style=" width:10%;">
						<eq name="list.chenktask" value="1">
						已完成
						<else/>
						未完成
						</eq>
						</div>
						 
						
						
				 
					  <div class="clear"></div>
					  </div>
	   </volist>
		<empty name="list">
<div class="infoempty"> 暂时木有内容呀～～</div>
</empty>
					
		
		
    </div>
	
	 
	
	
  </div>
   <div class="clear"></div>
</div>
<include file="public:footer" />

<script type="text/javascript">
$(document).ready(function()
{

$('.J_user_edit_username').live('click',function() {
		 var YTATADialog = $(this).dialog({
		        title: false,
        		loading: true,
				footer: false,
				header: false,
				border: false,
				backdrop: false
		});
		 $.getJSON(ajaxURL, { act: "ajax_edit_username"}, function(json){
					if (json.status==0){
						YTATADialog.hide();
						disapperTooltip("remind", json.content);
					}else if (json.status==1){
						YTATADialog.hide();
						var editDialog = $(this).dialog({
								title: "修改用户名",
								content:json.content,
								footer: true,
								header: true,
								border: true,
								innerPadding: true,
								backdrop: true,
								yes: function() {
									
									username=$('#ajax_edit_username_input').val()
										$.getJSON(ajaxURL, { act: "ajax_edit_username",username:username}, function(json){
										if (json.status==0){
											disapperTooltip("remind", json.content);
										}else if (json.status==1){
											$('#J_uname').text(json.username);
 											disapperTooltip("success",json.content);
										}else{
											disapperTooltip("remind","修改失败，未知错误");
										}
								});
									
 	
									
							}
						});
					}else{
						YTATADialog.hide();
						disapperTooltip("remind","未知错误");
					}
		});
	});
	$('.J_user_edit_mobile').live('click',function() {
		 var YTATADialog = $(this).dialog({
		        title: false,
        		loading: true,
				footer: false,
				header: false,
				border: false,
				backdrop: false
		});
		 $.getJSON(ajaxURL, { act: "ajax_edit_mobile"}, function(json){
					if (json.status==0){
						YTATADialog.hide();
						disapperTooltip("remind", json.content);
					}else if (json.status==1){
						YTATADialog.hide();
						var MDialog = $(this).dialog({
								title: "修改手机号",
								content:json.content,
								footer: true,
								header: true,
								border: true,
								innerPadding: true,
								backdrop: true
						});
					}else{
						YTATADialog.hide();
						disapperTooltip("remind","未知错误");
					}
		});
	});
});
</script>
</body>
</html>
